/*
wellbye：这个文件是自动生成的，不要手工修改！ 
*/
using System;
using ILRuntime.CLR.Method;
using ILRuntime.Other;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;

[ILRAdaptor]
public class ILRAdaptor_UICollectionViewLayout : CrossBindingAdaptor
{
    public override Type BaseCLRType { get { return typeof(UIKit.UICollectionViewLayout); } }
    public override Type AdaptorType { get { return typeof(Adaptor); } }

    public override object CreateCLRInstance(ILRuntime.Runtime.Enviorment.AppDomain appDomain, ILTypeInstance instance)
    {
        return new Adaptor(appDomain, instance); //创建一个新的实例
    }

    //实际的适配器类需要继承你想继承的那个类，并且实现CrossBindingAdaptorType接口
    public class Adaptor : UIKit.UICollectionViewLayout, CrossBindingAdaptorType
    {
        ILTypeInstance instance;
        ILRuntime.Runtime.Enviorment.AppDomain appDomain;

        public Adaptor() { }

        public Adaptor(ILRuntime.Runtime.Enviorment.AppDomain appDomain, ILTypeInstance instance)
        {
            this.appDomain = appDomain;
            this.instance = instance;
        }

        public ILTypeInstance ILInstance { get { return instance; } }

        
        
        IMethod methodPrepareForAnimatedBoundsChange0;
        bool isCallingPrepareForAnimatedBoundsChange0= false;
        
            public override void PrepareForAnimatedBoundsChange(CoreGraphics.CGRect p0) 
            { 
                if (methodPrepareForAnimatedBoundsChange0 == null && instance!=null )
                {
                    methodPrepareForAnimatedBoundsChange0 = instance.Type.GetMethod("PrepareForAnimatedBoundsChange", 1);
                }
                if (methodPrepareForAnimatedBoundsChange0 != null && !isCallingPrepareForAnimatedBoundsChange0)
                {
                    isCallingPrepareForAnimatedBoundsChange0 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                        };
                        object ret = appDomain.Invoke(methodPrepareForAnimatedBoundsChange0, instance, param );
                        
                        
                        isCallingPrepareForAnimatedBoundsChange0 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In PrepareForAnimatedBoundsChange *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.PrepareForAnimatedBoundsChange(p0);
                        
                    

                }
            }
        
        
        
        IMethod methodPrepareForCollectionViewUpdates1;
        bool isCallingPrepareForCollectionViewUpdates1= false;
        
            public override void PrepareForCollectionViewUpdates(UIKit.UICollectionViewUpdateItem[] p0) 
            { 
                if (methodPrepareForCollectionViewUpdates1 == null && instance!=null )
                {
                    methodPrepareForCollectionViewUpdates1 = instance.Type.GetMethod("PrepareForCollectionViewUpdates", 1);
                }
                if (methodPrepareForCollectionViewUpdates1 != null && !isCallingPrepareForCollectionViewUpdates1)
                {
                    isCallingPrepareForCollectionViewUpdates1 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                        };
                        object ret = appDomain.Invoke(methodPrepareForCollectionViewUpdates1, instance, param );
                        
                        
                        isCallingPrepareForCollectionViewUpdates1 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In PrepareForCollectionViewUpdates *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.PrepareForCollectionViewUpdates(p0);
                        
                    

                }
            }
        
        
        
        IMethod methodPrepareForTransitionFromLayout2;
        bool isCallingPrepareForTransitionFromLayout2= false;
        
            public override void PrepareForTransitionFromLayout(UIKit.UICollectionViewLayout p0) 
            { 
                if (methodPrepareForTransitionFromLayout2 == null && instance!=null )
                {
                    methodPrepareForTransitionFromLayout2 = instance.Type.GetMethod("PrepareForTransitionFromLayout", 1);
                }
                if (methodPrepareForTransitionFromLayout2 != null && !isCallingPrepareForTransitionFromLayout2)
                {
                    isCallingPrepareForTransitionFromLayout2 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                        };
                        object ret = appDomain.Invoke(methodPrepareForTransitionFromLayout2, instance, param );
                        
                        
                        isCallingPrepareForTransitionFromLayout2 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In PrepareForTransitionFromLayout *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.PrepareForTransitionFromLayout(p0);
                        
                    

                }
            }
        
        
        
        IMethod methodPrepareForTransitionToLayout3;
        bool isCallingPrepareForTransitionToLayout3= false;
        
            public override void PrepareForTransitionToLayout(UIKit.UICollectionViewLayout p0) 
            { 
                if (methodPrepareForTransitionToLayout3 == null && instance!=null )
                {
                    methodPrepareForTransitionToLayout3 = instance.Type.GetMethod("PrepareForTransitionToLayout", 1);
                }
                if (methodPrepareForTransitionToLayout3 != null && !isCallingPrepareForTransitionToLayout3)
                {
                    isCallingPrepareForTransitionToLayout3 = true;

                    try{
                        
                        //有参数，打包成数组
                        object[] param=new object[]{
                                p0,
                        };
                        object ret = appDomain.Invoke(methodPrepareForTransitionToLayout3, instance, param );
                        
                        
                        isCallingPrepareForTransitionToLayout3 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In PrepareForTransitionToLayout *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.PrepareForTransitionToLayout(p0);
                        
                    

                }
            }
        
        
        
        IMethod methodPrepareLayout4;
        bool isCallingPrepareLayout4= false;
        
            public override void PrepareLayout() 
            { 
                if (methodPrepareLayout4 == null && instance!=null )
                {
                    methodPrepareLayout4 = instance.Type.GetMethod("PrepareLayout", 0);
                }
                if (methodPrepareLayout4 != null && !isCallingPrepareLayout4)
                {
                    isCallingPrepareLayout4 = true;

                    try{
                        
                        //无参数调用
                        object ret = appDomain.Invoke(methodPrepareLayout4, instance, null );
                        
                        
                        
                        isCallingPrepareLayout4 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In PrepareLayout *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.PrepareLayout();
                        
                    

                }
            }
        
        
        
        IMethod methodPrepareForInterfaceBuilder5;
        bool isCallingPrepareForInterfaceBuilder5= false;
        
            public override void PrepareForInterfaceBuilder() 
            { 
                if (methodPrepareForInterfaceBuilder5 == null && instance!=null )
                {
                    methodPrepareForInterfaceBuilder5 = instance.Type.GetMethod("PrepareForInterfaceBuilder", 0);
                }
                if (methodPrepareForInterfaceBuilder5 != null && !isCallingPrepareForInterfaceBuilder5)
                {
                    isCallingPrepareForInterfaceBuilder5 = true;

                    try{
                        
                        //无参数调用
                        object ret = appDomain.Invoke(methodPrepareForInterfaceBuilder5, instance, null );
                        
                        
                        
                        isCallingPrepareForInterfaceBuilder5 = false;

                        
                    }
                    catch(Exception e){
                        mb.App.logger.Log("**** Catch Exception In PrepareForInterfaceBuilder *****");
                        mb.App.logger.Log(e.ToString());
                        mb.App.logger.Log("**********************");
                        throw e;
                    }
                }
                else
                {
                    
                    
                        
                            base.PrepareForInterfaceBuilder();
                        
                    

                }
            }
        
        
    }
}